<template />
<script>
import { getAttributeByTypeId } from '@/api/MallPages/goods.js'
export default {
  provide() {
    return {
      reload: this.reload,
    }
  },
  globalData: {
    brand: []
  },
  async created() {
    /** 获取所有的电动车品牌 */
    const res = (await getAttributeByTypeId({ belongingType: 1 })).data[ 0 ].attributeValueList

    getApp().globalData.brand.push({ name: '全部', value: null })

    getApp().globalData.brand = res.map(item => {
      return { name: item.value, value: item.value }
    })
    getApp().globalData.malltime = 0
    getApp().globalData.publishtime = 0

  },
  data() {
    return {

    }
  },
  onLaunch: function() {
    console.log('App Launch')
  },
  onShow: function() {
    console.log('App Show')
  },
  onHide: function() {
    console.log('App Hide')
  }
}
</script>

<style lang="scss">
	/* 全局样式 */
	@import "@/uni_modules/uview-ui/index.scss";
	@import './styles/global.scss';
</style>
